<?php
//整数的多种表示形式
echo 12345,"\n";//10进制
echo 0b1011,"\n";//2进制，0b开头，后跟0~1数字
echo 567,"\n";//10进制
echo 0567,"\n";//8进制，0或0o开头，后跟0~7数字
echo 0x2AF,"\n";//16进制，0x开头，后跟0~9A~F数字
//算术运算符
echo 18/5,"\n";//18除以5
echo 18%5,"\n";//18除以5的余数
echo @(18.9%5.8),"\n";//%两边的数据会转换为整数，18除以5的余数
echo 3**2.5,"\n";//3的2.5次方
//运算符的优先级
echo 5-6*2,"\n";//*的优先级比-高
//运算符的结合性
echo 8/4*2,"\n";//从左向右计算
echo (-3)**2,"\n";//()的优先级是最高的
//不同类型数据间的算数运算
echo '2000'+123,"\n";
echo 123+'2000',"\n";
echo '2000'+'123',"\n";
echo '2000'+'0o123',"\n";//不识别2,8,16进制
echo '2000'+'0x123',"\n";
echo '2000'+'+123',"\n";//可以识别正负号
echo '2000'+'-123',"\n";
echo '2000'+'123aaaaa',"\n";
//echo '2000'+'aaaaa',"\n";//一开始就是非法数字，无法计算
echo '2000'+'2e2',"\n";//'2e2'就是200

